package com.example.huizhou.Service;

import com.example.huizhou.bean.Teacher;
import com.example.huizhou.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import java.awt.print.Pageable;
import java.util.List;

@Service
public class TeacherService {
    @Autowired
    TeacherMapper teacherMapper;

    public void add(int id,String name,String password,String sex,String faculty){
        teacherMapper.add(id,name,password,sex,faculty);    }

    public List<Teacher> findAll() {
        return teacherMapper.findAll();
    }

    public void save(Teacher teacher) {
        teacherMapper.save(teacher);
    }

    public void delete(int Id) {
        teacherMapper.delete(Id);
    }

    public String findtc(int Id) {
        String psw = teacherMapper.findtc(Id);
        return psw;
    }

    public Teacher findls(int Id){
        Teacher teacher = teacherMapper.findls(Id);
        return teacher;
    }

    public void updatepsw(int Id,String psw){
        teacherMapper.updatepsw(Id,psw);
    }

}
